import request from '@/utils/request'
// 部门列表
export function getDepartmentListApi() {
  return request({
    url: '/company/department'
  })
}

export function delDepartmentByIdApi(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
// 添加
export const addDepartmentApi = data => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 部门详情接口
export function editDepartmentList(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 修改接口
export function editDepartmentApi(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
